PHOTO BY TYLER MERBLER
Los Angeles, CA has a population of 3.98M people with a median age of 35.6 and a median household income of $54,432. Between 2015 and 2016 the population of Los Angeles, CA grew from 3.97M to 3.98M, a 0.11% increase and its median household income grew from $52,024 to $54,432, a 4.63% increase.
PHOTO BY PAOLO GAMBA
Los Angeles County, CA has a population of 10.1M people with a median age of 36.3 and a median household income of $61,338. Between 2015 and 2016 the population of Los Angeles County, CA declined from 10.2M to 10.1M, a 0.32% decrease and its median household income grew from $59,134 to $61,338, a 3.73% increase.
LA is a tech hub, with $ x ,000 tech jobs roughhty x% of the nation …. COmpanies like Amazon, Tesla, etc …have headquarters in Los Angeles. It is a vibrant segment of the economy. While California is the 7th economy in the world, Los Angeles is the 24th economy in the world bigger than countries like ….
Let’s take a look at the tech industry employment [1] numbers for the past 13 years.
# add geom_hline showing "Total media wages"
# # Change the "horizontal justification" to be left-justified with hjust
mycols <- c("blue", "red")
ggplot(data=occupation, mapping=aes(x=industry, y=median_wages17, fill=compu)) +
stat_summary(fun.y=mean, geom="bar") +
scale_y_continuous(labels=dollar) +
labs(title="Median Wages by Industry in 2017", x="", y="") +
coord_flip() +
theme(legend.position="none") +
scale_fill_manual(values=mycols) +
geom_text(aes(label = median_wages17), color = "black", hjust=-0.1) +
geom_hline(yintercept = 37690, color="red", size=1, linetype="dashed")# remove all occupations
occupation <- occupation[2:23,]
occupation$industry <- fct_reorder(occupation$industry, occupation$change2026, mean, na.rm=TRUE)
ggplot(data=occupation, mapping=aes(x=industry, y=change2026, fill=compu)) +
stat_summary(fun.y=mean, geom="bar") +
scale_y_continuous() +
labs(title="Employment Jobs Growth Projection by Industry 2016-2026 ", x="", y="") +
coord_flip() +
theme(legend.position="none") +
scale_fill_manual(values=mycols) +
geom_text(aes(label = change2026), color = "black", hjust=-0.1) occupation$industry <- fct_reorder(occupation$industry, occupation$perchange206, mean, na.rm=TRUE)
ggplot(data=occupation, mapping=aes(x=industry, y=perchange206, fill=compu)) +
stat_summary(fun.y=mean, geom="bar") +
scale_y_continuous() +
labs(title="% Employment Growth Projection by Industry 2016-2026 ", x="", y="") +
coord_flip() +
theme(legend.position="none") +
scale_fill_manual(values=mycols) +
geom_text(aes(label = perchange206), color = "black", hjust=-0.1)
2017 Employment by major occupational group, 2016 and projected 2026 (Numbers in thousands) [1]. Tech employees are compensated nicely due to this tech boom. For example, in 207 while the annual medialn wage for all occupations was $37,000 in the U.S., it was $84,600 for the computer occupations, second only to $102,000 of the management occupations as shown in Table 1.
Figure 1 shows the total jobs in the city of Los Angeles and County.
# install imageMagick
# https://www.imagemagick.org/script/download.php#windows
# Tutorials
# https://ryanpeek.github.io/2016-10-19-animated-gif_maps_in_R/
# https://cran.r-project.org/web/packages/magick/vignettes/intro.html
# library(magick) # this is call to animate/read pngs
# save all png files to path folder
# create gif
# list.files(path = "C:/Users/joao_/Downloads/Gif/", pattern = "*.png", full.names = T) %>%
# map(image_read) %>% # reads each path file
# image_join() %>% # joins image
# image_animate(fps=100) %>% # animates, can opt for number of loops
# image_write("tech_100.gif") # write to current dir
Figure 2 shows the evolution of Tech Jobs by zip code from 2012 to 2017
## OGR data source with driver: ESRI Shapefile
## Source: "C:\Users\joao_\Dropbox\Data Science\UCLA\Git\los-angeles-tech-jobs\data\zip-codes\geo_export_1887acad-adf8-4181-8c7d-50a16a3435f2.shp", layer: "geo_export_1887acad-adf8-4181-8c7d-50a16a3435f2"
## with 311 features
## It has 4 fields
## objectid shape_area shape_len zipcode
## 0 1 95563402 48677.28 90001
## 1 2 82752224 44972.02 90002
## 2 3 102660027 63294.58 90003
## 3 4 83956967 52471.90 90004
## 4 5 36897792 88445.00 90005
## 5 6 53707686 37830.42 90006
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [12] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [23] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [34] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [45] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [56] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [67] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [78] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [89] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [100] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [111] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [122] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [133] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [144] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [155] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [166] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [177] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [188] TRUE TRUE TRUE FALSE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [199] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [210] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [221] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [232] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [243] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [254] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [265] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [276] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [287] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [298] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [309] TRUE TRUE TRUE
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [15] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [29] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [43] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [57] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [71] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [85] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [99] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [113] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [127] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [141] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [155] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [169] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [183] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [197] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [211] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [225] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [239] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [253] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [267] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [281] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [295] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [309] TRUE TRUE TRUE
## 'data.frame': 311 obs. of 4 variables:
## $ objectid : num 1 2 3 4 5 6 7 8 9 10 ...
## $ shape_area: num 9.56e+07 8.28e+07 1.03e+08 8.40e+07 3.69e+07 ...
## $ shape_len : num 48677 44972 63295 52472 88445 ...
## $ zipcode : Factor w/ 311 levels "90001","90002",..: 1 2 3 4 5 6 7 8 9 10 ...
## objectid shape_area shape_len zipcode
## 0 1 95563402 48677.28 90001
## 1 2 82752224 44972.02 90002
## 2 3 102660027 63294.58 90003
## 3 4 83956967 52471.90 90004
## 4 5 36897792 88445.00 90005
## 5 6 53707686 37830.42 90006
## 'data.frame': 311 obs. of 8 variables:
## $ GEOID: chr "90001" "90002" "90003" "90004" ...
## $ V1 : num 5545 5546 5547 5548 5549 ...
## $ year : num 2017 2017 2017 2017 2017 ...
## $ tech : num 96 5 33 784 606 ...
## $ info : num 19 0 0 224 279 77 71 111 860 0 ...
## $ prof : num 77 5 33 560 327 ...
## $ per : num 1.03 0.15 0.49 7.61 8.88 ...
## $ total: num 9334 3320 6720 10296 6824 ...
## [1] "objectid" "shape_area" "shape_len" "zipcode"
Fig. X shows dot density for all tech jobs in LA county. Each dot = 10 people
Fig. 8 shows the association between the 2012 CHCI and the 2016 median household income of 282 zip codes in L.A. County. We can see a very strong correlation correlation between the human capital level [23] and the household income for the zip code in L.A. It demonstrates the importance to invest in education (chci) in order to create more productive workforce and more high paying jobs.
Source - 5-year American Community Survey 2012-2016 Global Innovation Index 2018, World Bank Population Data 2016, Q11 - Current country of residence [19-21]
Shape Files - https://data.lacity.org/ Los Angeles Open Data ACS
https://geocompr.robinlovelace.net/index.html
#googleWalkout [2] and is bad business - says Forbes [3]. In Fig. 1 (above), we use superhero-themes #batman #wonderwoman to visualize the heavy topic of #gender_equality in #datascience. See a bar chart for a more accurate breakdown [4]. Source: survey question Q1 - What is your gender? Sample size = 23,859 respondents
The shapefile format is a common way to store data for geographic areas, namely polygons, lines, and points. Each tract is represented as a polygon (i.e. some shape)
Dowload shape files for county from LA Data Portal https://data.lacounty.gov/Geospatial/ZIP-Codes/65v5-jw9f